package com.xpand.guava;


import com.google.common.collect.HashMultiset;

/**
 * @Author: wei.wang
 * @Description:
 * @Date 2017/12/27 16:52
 * @Modified
 */
public class MulisetTest {
    public static void main(String[] args) {
        HashMultiset<String> multiset = HashMultiset.create();
        multiset.add("aa");
        multiset.add("aa");
        multiset.add("aa");
        multiset.add("aa");
        multiset.add("aa");
        multiset.add("ab");
        multiset.add("ab");
        multiset.add("ab");
        System.out.println(multiset);
        System.out.println(multiset.count("aa"));
        System.out.println(multiset.size());
        System.out.println(multiset.elementSet());
        multiset.add("aa",3);
        System.out.println(multiset);
        System.out.println(multiset.size());
    }
}
